package org.example.model;

/**
 * @author by PengHongChao
 * @date 2025/6/26 12:50
 */

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageResult<T> {
    private long total;          // 总记录数
    private List<T> list;        // 当前页数据
    private int pageNum;         // 当前页码
    private int pageSize;        // 每页数量
    private int totalPages;      // 总页数

    public PageResult(long total, List<T> list) {
        this.total = total;
        this.list = list;
    }
}
